/**
 * 
 */
package com.yullage.ae;

import java.io.IOException;
import java.util.HashSet;
import java.util.Set;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.yullage.ae.attritioner.LinearAttritioner;
import com.yullage.ae.core.Mind;
import com.yullage.ae.util.EmpathyEvaluator;
import com.yullage.ae.util.MindScriptPlayer;

/**
 * @author Yu-chun Huang
 * 
 */
public class Boot {
	/**
	 * Logger
	 */
	private static final Logger logger = LoggerFactory.getLogger(Boot.class);

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String mindFileName1 = "mind_files/simple_mind_1.mind";

		String scriptFileName1 = "mind_files/simple_mind_1_Mother_1.00.mindscript";
		String outputFileName1 = "mind_output/simple_mind_1_Mother_1.00.mindoutput";

		Mind simpleMind1 = new Mind(new LinearAttritioner(0.7, 0.1));

		MindScriptPlayer mindScriptPlayer = new MindScriptPlayer();

		// Mind 1
		try {
			simpleMind1.load(mindFileName1);
		} catch (IOException e) {
			logger.error("Can not load mind from file: {}", mindFileName1);
			e.printStackTrace();
			return;
		}

		try {
			mindScriptPlayer.load(simpleMind1, scriptFileName1);
			mindScriptPlayer.runScript(5, outputFileName1);
			// mindScriptPlayer.runScript(5, System.out);
		} catch (IOException e) {
			logger.error("Can not output mind intensity.");
			e.printStackTrace();
		} catch (Exception e) {
			logger.error("Can not load mind script from file: {}",
					scriptFileName1);
			e.printStackTrace();
		}
	}
}
